<!DOCTYPE html>
<html xmlns:th = "http://www.thymeleaf.org">
<head>
    <meta content="text/html;charset=UTF-8" http-equiv="Content-Type" >
    <title>发布提问</title>
    <script src="/static/js/jquery-2.0.0.min.js" type="application/javascript"></script>
    <link href="/static/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="/static/css/bootstrap-theme.min.css" rel="stylesheet"/>
    <link href="/static/css/community.css" rel="stylesheet"/>
    <script src="/static/js/bootstrap.min.js" type="application/javascript"></script>

</head>

<body>

<!--导航栏-->
<nav th:insert="navigation :: nav"></nav>

    <div class="container-fluid main">
        <div class="row">
           <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12" >
               <h2><span aria-hidden="true" class="glyphicon glyphicon-plus"></span><span th:text="${title != null ? title : '发起'}"></span></h2>
               <hr>
               <form action="/publish/save" method="post">
                   <input type="hidden" name = "id" th:value="${question != null ?question.id: ''}">
                   <div class="form-group">
                       <label for="title">问题标题(简单扼要)</label>
                       <input class="form-control"  id="title" name = "title" placeholder="问题标题" required  type="text"  th:value="${question != null ?question.title: ''}">
                   </div>
                   <div class="form-group">
                       <label for="title">问题补充(必填，请参照右侧提示)</label>
                       <textarea class="form-control" cols="30" id="description" name="description" required rows="10"  th:text="${question != null ?question.description: ''}" ></textarea>
                   </div>
                   <div class="form-group">
                       <label for="title">添加标签</label>
                       <input class="form-control" id="tag" name = "tag" placeholder="输入标签，以，分割" required  type="text"  th:value="${question != null ?question.tag: ''}">
                   </div>
                   <div class="container-fluid main">
                       <div class="row">
                           <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12" >
                   <span class="alert alert-danger" th:if="${error!=null}">[[${error}]]</span>
                           </div>
                           <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12" >
                   <button class="btn btn-success btn-publish" type="submit" th:text="${title != null ? title : '发布'}"></button>
                           </div>
                       </div>
                   </div>
               </form>
           </div>
            <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12" >
                <h3>发起问题指南</h3>
                <b>·问题标题：</b>请用精简的语言描述您发布的问题，不超过25字<br>
                <b>·问题补充：</b>详细补充您的问题内容，并确保问题描述清晰直观，并提供一些相关资料：<br>
                <b>·选择标签：</b>选择一个或多个合适的标签，用逗号隔开，每个标签不超过10个字
            </div>
        </div>
    </div>

</body>
</html>